Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

How do I get rid of the ?p= in my URLs?

2

Comments

  • chanhchanh OngETC.com - CMS Researcher ✭✭

    @zayadur said:
    This is my phpinfo page: http://omniboard.co/phpinfo.php

    How come your phpinfo() does not have this show?

    Loaded Modules core mod_log_config mod_logio prefork http_core mod_so mod_actions mod_alias mod_auth_basic mod_auth_digest mod_authn_file mod_authz_default mod_authz_groupfile mod_authz_host mod_authz_user mod_autoindex mod_cgi mod_dav mod_dav_fs mod_dav_svn mod_authz_svn mod_deflate mod_dir mod_env mod_fcgid mod_mime mod_negotiation mod_php5 mod_proxy mod_proxy_balancer mod_proxy_connect mod_proxy_http mod_reqtimeout mod_rewrite mod_ruby mod_setenvif mod_ssl mod_status mod_suexec

  • x00x00 MVP
    edited March 2014

    @chanh there is no guarantee of that. You are probably thinking of apache2handler bu there are many ways of running php

    grep is your friend.

  • x00x00 MVP
    edited March 2014

    he is having problem with the the urls not changing, not the routing of the urls or at leat that would be secondary.

    You can test the routing easily by typing in a pretty url.

    grep is your friend.

  • zayadurzayadur New
    edited March 2014

    @x00 said:
    Try turning off apc in /web/conf/php5.ini there is a line apc.enabled=1 to apc.enabled=0 or it might say On

    The contents of my php.ini file in my root directory

    register_globals = off
    allow_url_fopen = off
    
    expose_php = Off
    max_input_time = 60
    variables_order = "EGPCS"
    extension_dir = ./
    upload_tmp_dir = /tmp
    precision = 12
    SMTP = relay-hosting.secureserver.net
    url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="
    
    
    ; Only uncomment zend optimizer lines if your application requires Zend Optimizer support
    
    ;[Zend]
    ;zend_optimizer.optimization_level=15
    ;zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
    ;zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
    ;zend_extension=/usr/local/Zend/lib/Optimizer-3.3.3/ZendExtensionManager.so
    ;zend_extension_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3/ZendExtensionManager_TS.so
    
    
    ; -- Be very careful to not to disable a function which might be needed!
    ; -- Uncomment the following lines to increase the security of your PHP site.
    
    ;disable_functions = "highlight_file,ini_alter,ini_restore,openlog,passthru,
    ;             phpinfo, exec, system, dl, fsockopen, set_time_limit,
    ;                     popen, proc_open, proc_nice,shell_exec,show_source,symlink"
    

    I do not see apc.* settings anywhere, is this a problem?

  • I do not see apc.* settings anywhere, is this a problem?

    add

    apc.enabled=0
    

    before the zend stuff

    grep is your friend.

  • Ok, done. Nothing else seems to have changed, I'm still getting Internal Server Error when forcing it to load /directory instead of index.php?p=/directory

  • ShadowdareShadowdare r_j MVP
    edited March 2014

    The internal server error might be caused by errors with the htaccess rules, but the phpinfo page says that APC is still enabled. Changes to the PHP configuration file require a restart to take effect. Have you restarted the web server?

    Add Pages to Vanilla with the Basic Pages app

  • x00x00 MVP
    edited March 2014

    there is an issue with htaccess. Have you go a clean copy?

    grep is your friend.

  • grep is your friend.

  • chanhchanh OngETC.com - CMS Researcher ✭✭

    Would you check for this?

     Open the Apache configuration file located at /etc/httpd/conf/httpd.conf
    Change AllowOverride None to AllowOverride All inside the DocumentRoot Directory Directive, normally <Directory "/var/www/html">
    
  • @chanh said:
    Would you check for this?

     Open the Apache configuration file located at /etc/httpd/conf/httpd.conf
    Change AllowOverride None to AllowOverride All inside the DocumentRoot Directory Directive, normally <Directory "/var/www/html">
    

    AllowOverride None on its own isn't going to cause a server error. I simply means that .htaccess is not read.

    So first he needs to find out what the server error is. If it is isn't in the override, it is in there cofig somewhere.

    I is better to find out what to problem is than to debug by shotgun.

    grep is your friend.

  • zayadurzayadur New
    edited March 2014

    @x00 said:
    there is an issue with htaccess. Have you go a clean copy?

    Yes, it's a clean, #Original .htaccess file that came with the 2.2.3.4 package.

    @chanh:

    I can't access my Apache configuration. I'm on a host that only allows me to view my /html/ directory, I can't go back up.

    @Shadowdare

    I contacted my provider, and they said the issue is an infinite loop caused by the RewriteRule. I have to modify my .htaccess file to fix that, but I'm not sure how to modify it to prevent the infinite loop.

    You guys touched up on the right idea.

  • chanhchanh OngETC.com - CMS Researcher ✭✭

    Your .htaccess should just have a few lines which should not cause an infinite loop.

    RewriteEngine On
    # RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]

    What is in your .htaccess?

  • zayadurzayadur New
    edited March 2014

    This is my .htaccess file at the moment

    # Original
    # If you modify this file then change the above line to: # Modified
    <IfModule mod_rewrite.c>
       RewriteEngine On
       # Certain hosts may require the following line.
       # If vanilla is in a subfolder then you need to specify it after the /. 
       # (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum)
       # RewriteBase /
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]
    </IfModule>
    

    Note: I replaced the "<" and ">" with LESSTHAN and GREATERTHAN so it shows up inside the pre tags.

  • IMPORTANT UPDATE and POTENTIAL SOLUTION

    I uncommented #RewriteBase / (by removing the #) in my .htaccess file and the RewriteUrls function is working all of a sudden. I don't understand why this didn't work before, because I've already tried it, but it's working after all.

    Thank you guys for all your help and input, I'll keep everyone here posted in case something does come up, but this seems to be /the/ solution in the case of /some/ hosts.

    Many Regards!

  • x00x00 MVP
    edited March 2014

    I suspect the reason why RewiteBase needs to be explicit is to undo the effect of an Alias in your server rules.

    grep is your friend.

  • zayadurzayadur New
    edited March 2014

    @x00 said:
    I suspect the reason why RewiteBase needs to be explicit is to undo the effect of an Alias in your server rules.

    You're right! omniboard.co is the domain for disqlosure.net/omniboard . Now I know why RewriteBase is necessary.

    UPDATE
    I'm still getting Internal Server Errors through my dashboard. I have to open functions in a new tab to apply changes. Are there seperate rewrite functions for the dashboard? Am I missing something?

  • chanhchanh OngETC.com - CMS Researcher ✭✭

    Did you clear your "cache"?

  • @chanh said:
    Did you clear your "cache"?

    good idea

    @ zayadur said:
    Are there seperate rewrite functions for the dashboard? Am I missing something?

    nope

    grep is your friend.

  • BTW useful info

    best not to use

    <IfModule mod_rewrite.c></IfModule>
    

    It actually uses a little resource. if the module is there you don't need the check anymore, if is not on, then you need to know about ti anyway.

    grep is your friend.

Sign In or Register to comment.