Search the Community
Showing results for tags 'vanity url'.
-
I need help with a vanity url .htaccess I have a profile based site that I want to open up the profile using the url and the member profile name example: http://example.com/member Then I want to redirect to the members profile here is what I have RewriteEngine On RewriteBase / RewriteRule ^([A-Za-z0-9-]+)/?$ view.php?page=$1 [L]
-
Hey guys, I'm in the process of creating a website and Im currently adding a blog. I have the htaccess working so far, but I dont know how to add another condition for the blog and htaccess is really tricky for me... regardless, this is current htaccess: <IfModule mod_rewrite.c> Options +FollowSymlinks RewriteEngine On </IfModule> # If requested resource exists as a file or directory, skip next two rules RewriteCond %{DOCUMENT_ROOT}/$1 -f [OR] RewriteCond %{DOCUMENT_ROOT}/$1 -d RewriteRule (.*) - [s=2] # Remove the .php extension RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.php [NC,L] #RewriteCond %{REQUEST_FILENAME} !-f #RewriteCond %{REQUEST_FILENAME} !-d #RewriteRule ^(.*)$ index.php?page=$1 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ app.php?tag=$1 [QSA,L] # ---------------------------------------------------------------------- # Custom 404 page # ---------------------------------------------------------------------- # You can add custom pages to handle 500 or 403 pretty easily, if you like. ErrorDocument 403 /error.php?type=403 ErrorDocument 404 /error.php?type=404 ErrorDocument 500 /error.php?type=500 This works, though I have no idea if its in any way correct. What I need is a normal vanity url thing which would rewrite /blog/some-blog-title-here/1 to /blog.php?title=some-blog-title&id=1 but obviously the user would see the first option. Any help or suggestions?
- 9 replies
-
- htaccess
- vanity url
-
(and 1 more)
Tagged with: