HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
How to remove "index.php?p=/" from all URLs?
parneetbatra
New
Is there any easy way to remove all index.php?p=/ from URLs? Possibly in .htaccess?
Current URL:
http://domain.com/index.php?p=/categories/categoryname
Preferred URL:
http://domain.com/categories/apps
Any easy way to do this?
Tagged:
0
Comments
Added to /conf/config.php
$Configuration['Garden']['RewriteUrls'] = true;
web.config
Live URL: http://66.45.240.93/activity
Open any page, it will redirect to same.
https://open.vanillaforums.com/discussion/comment/220157/#Comment_220157
What's web.config? Is it IIS? There are some discussions on that topic but I don't remember if it is possible to use Vanilla on IIS
Yes, it's on IIS. There's a web.config file for rewrite rules for IIS.
I found a post, someone had the same issue. Looks like work on IIS. Please see the link below.
https://open.vanillaforums.com/discussion/15322/how-to-remove-index.phpp-from-all-urls
As discussed in this discussion post, I guess something wrong with the .htaccess file.
This is the .htaccess file that I using.
https://github.com/vanilla/vanilla/blob/b393ce00c74d4e83ca654d835f5ab8f7d495bba3/.htaccess.dist
.dist
https://open.vanillaforums.com/discussion/comment/260422/#Comment_260422
Did you uncomment this line
# RewriteBase /
By removing # ?
If your forum is in a folder ie forum
Then it should be
RewriteBase /forum
Yes, I did the same in the .htaccess file.
Open any page, only load the home page.
I added $Configuration['Debug'] = TRUE; in the conf/config.php
Now you can see the log.
Live URL: http://66.45.240.93/activity
It's working now. Thank you everyone for your help.
I use this web.config file.
https://open.vanillaforums.com/discussion/27568/enabling-clean-urls-on-iis-installations#latest
I'm getting issues on few pages. Can you please help with that?
Discussion view page
http://3.131.95.145/discussion/1/welcome-to-awesome#latest
Profile page
http://3.131.95.145/profile/Victorine%20Courtois
New discussion page
http://3.131.95.145/post/discussion/general
These pages are working fine. After login when you will open these pages looks like the header and footer are not loading.
Credentials
http://3.131.95.145/
email: admin@example.com
username: admin
password: password
https://open.vanillaforums.com/discussion/comment/219669/#Comment_219669
https://open.vanillaforums.com/discussion/comment/233540/#Comment_233540
Disable plugin as part of troubleshooting.
thank you @Kaspar It's working now. Something wrong with the plugin.